﻿<!doctype html>
<html>
<head>
    <title>微街秀 > 效果统计</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    <link href="css/RecordClick.css" rel="stylesheet" type="text/css" />
    <style>
        .Rptopimg
        {
            width: 40px;
            height: 40px;
            border-radius: 60px;
            margin: 10px auto 0 auto;
        }
        .RpLeft
        {
            width: 20%;
            height: 60px;
            float: left;
            text-align: center;
        }
        .RpLian
        {
            float: left;
            padding-top: 10px;
            line-height: 20px;
            width: 40%;
            height: 50px;
        }
        .RpRgith
        {
            width: 39%;
            float: right;
            height: 50px;
            padding-top: 10px;
            line-height: 20px;
        }
        .stag
        {
            height: 60px;
            width: 100%;
            font-size: 12px;
            border-bottom: 1px #D6D5D3 solid;
            color: #414141;
        }
        .stag:hover
        {
            background-color: #EAEAEA;
        }
    </style>
</head>
<body>
    <div>
        <div class="wamtop">
            <div class="topleft" onclick="javascript:window.location.href='Makead_2.html'">
                <img src="img/5.jpg" />
            </div>
            <div class="topcententxt">
                效果统计
            </div>
        </div>
        <div class="tbody">
         
        </div>
    </div>
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="js/ajax-data.js" type="text/javascript"></script>
    <script src="js/base.js?123" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script>
        var pagecount = "0";
        var page = 1;
        var keyword = ""; //关键词
        var article_id = "0";
        $(document).ready(function () {
            article_id = getQueryString("article_id");
            load(page);
            $(window).bind("scroll", function () {
                //当滚动条滚动时
                var scollTop = $(this).scrollTop() + $(this).height();
                var scollH = $(document).height();
                if (scollH - scollTop < 100) {
                    if (wait.isShow) { return; } //如果正在加载，则返回
                    page++;
                    load(page);
                }
                return false;
            });
            $("#searchico").click(function () { $("#ws_tg").html(""); load(page) });
        });
        function load(page) {
            if (pagecount == "1") { return; }
            if (!islogin()) { window.location.href = 'login.html'; return; }
            keyword = $("#Stext").val();
            AjaxStart("ajax/fc_shared.ashx?getdetaillist", "article_id=" + article_id + "&page_index=" + page, function (data) {
                if (data.code == "4") {
                    Alert(data.msg.toString()); pagecount = "1"; return;
                }
                else if (data.code != 0) {
                    Alert(data.msg);
                    return;
                }
                if (data.item.pageCount < page) {
                    if (pagecount == "0")
                        Alert('到底了！');
                    pagecount = "1"; return;
                }
                loadhtml(data);
            });
        }


        function loadhtml(data) {
            $(data.item.table).each(function () {
                var area = "";
                if (this.area1 != null && this.area1 != "")
                    area += this.area1;
                if (this.area2 != null && this.area2 != "")
                    area += this.area2;
                if (this.area3 != null && this.area3 != "")
                    area += this.area3;
                var name = this.wx_name;
                if (name == null || name == "") {
                    name = this.mobile ? this.mobile.substring(0, 10) + "*" : "";
                }
                $(".tbody").append(" <div class=\"stag\" onclick=\"window.location.href='MakeresultDetail.html?id=" + this.id + "&article_id=" + article_id + "'\"><div class=\"RpLeft\"><img src=\"" + this.picurl + "\" class=\"Rptopimg\"></div><div class=\"RpLian\"><span>" + name + "</span><br><span>" + this.date.replace("T", " ").substring(0, 19) + "</span></div><div class=\"RpRgith\">地区<p>" + area + "</p></div></div");
            });
        }

    </script>
</body>
</html>
